package mbms.mobilebudget.entity;

import java.io.Serializable;

import mbms.mobilebudget.entity.EnumValues.AccountType;
import mbms.mobilebudget.entity.EnumValues.BankNameEnum;
import mbms.mobilebudget.entity.EnumValues.CurrencyType;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName="bank_account")
public class BankAccount implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -6517191202883850554L;
	
	@DatabaseField(generatedId = true)
	private Integer id;
	
	@DatabaseField(canBeNull = false)
	private BankNameEnum bankName;
	
	@DatabaseField(canBeNull = true)
	private String branch;
	
	@DatabaseField(canBeNull = false)
	private String accountNumber;
	
	@DatabaseField(canBeNull = false, unique= true,columnName="iban")
	private String IBAN;
	
	@DatabaseField(canBeNull = false)
	private AccountType accountType;
	
	@DatabaseField(canBeNull = false)
	private CurrencyType currencyType;
	
	@DatabaseField(canBeNull = true)
	private Double totalExpenseAmount;
	
	@DatabaseField(canBeNull = true)
	private Double totalIncomeAmount;
	
	@DatabaseField(canBeNull = false,foreign=true)
	private User user;
	
	public BankAccount() {
	}
	
	
	
	public BankAccount(Integer id, BankNameEnum bankName, String branch,
			String accountNumber, String iBAN, AccountType accountType,
			CurrencyType currencyType, Double totalExpenseAmount,
			Double totalIncomeAmount, User user) {
		super();
		this.id = id;
		this.bankName = bankName;
		this.branch = branch;
		this.accountNumber = accountNumber;
		IBAN = iBAN;
		this.accountType = accountType;
		this.currencyType = currencyType;
		this.totalExpenseAmount = totalExpenseAmount;
		this.totalIncomeAmount = totalIncomeAmount;
		this.user = user;
	}



	public BankAccount(Integer id, BankNameEnum bankName, String branch,
			String accountNumber, String iBAN, AccountType accountType,
			CurrencyType currencyType, User user) {
		super();
		this.id = id;
		this.bankName = bankName;
		this.branch = branch;
		this.accountNumber = accountNumber;
		IBAN = iBAN;
		this.accountType = accountType;
		this.currencyType = currencyType;
		this.user = user;
	}


	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}

	public BankNameEnum getBankName() {
		return bankName;
	}


	public void setBankName(BankNameEnum bankName) {
		this.bankName = bankName;
	}


	public String getBranch() {
		return branch;
	}
	public void setBranch(String branch) {
		this.branch = branch;
	}
	public String getAccountNumber() {
		return accountNumber;
	}
	public void setAccountNumber(String accountNumber) {
		this.accountNumber = accountNumber;
	}
	public String getIBAN() {
		return IBAN;
	}
	public void setIBAN(String iBAN) {
		IBAN = iBAN;
	}
	public AccountType getAccountType() {
		return this.accountType;
	}
	public void setAccountType(AccountType accountType) {
		accountType = this.accountType;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public CurrencyType getCurrencyType() {
		return currencyType;
	}
	public void setCurrencyType(CurrencyType currencyType) {
		this.currencyType = currencyType;
	}


	public Double getTotalExpenseAmount() {
		return totalExpenseAmount;
	}


	public void setTotalExpenseAmount(Double totalExpenseAmount) {
		this.totalExpenseAmount = totalExpenseAmount;
	}


	public Double getTotalIncomeAmount() {
		return totalIncomeAmount;
	}


	public void setTotalIncomeAmount(Double totalIncomeAmount) {
		this.totalIncomeAmount = totalIncomeAmount;
	}


	
}
